package tcp;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class ClientDir {
    public static void main(String[] args) throws IOException {
        //创建一个socket
        Socket socket = new Socket("127.0.0.1",10000);

        //获取io流写数据
        OutputStream os = socket.getOutputStream();
        os.write("绝地求生".getBytes());

        //释放资源
        os.close();
        socket.close();
    }
}
